home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_gimp.idb / usr / freeware / share / gimp / scripts / glowing-logo.scm.z / glowing-logo.scm
Encoding:
GIMP Script-Fu Script  |  1999-07-21  |  2.4 KB  |  71 lines

  1. ;  GLOWING
  2. ;  Create a text effect that simulates a glowing hot logo
  3.  
  4. (define (script-fu-glowing-logo text size font bg-color)
  5.   (let* ((img (car (gimp-image-new 256 256 RGB)))
  6.      (border (/ size 4))
  7.      (grow (/ size 4))
  8.      (feather1 (/ size 3))
  9.      (feather2 (/ size 7))
  10.      (feather3 (/ size 10))
  11.      (text-layer (car (gimp-text img -1 0 0 text border TRUE size PIXELS "*" font "*" "*" "*" "*")))
  12.      (width (car (gimp-drawable-width text-layer)))
  13.      (height (car (gimp-drawable-height text-layer)))
  14.      (glow-layer (car (gimp-layer-copy text-layer TRUE)))
  15.      (bg-layer (car (gimp-layer-new img width height RGB_IMAGE "Background" 100 NORMAL)))
  16.      (old-fg (car (gimp-palette-get-foreground)))
  17.      (old-bg (car (gimp-palette-get-background))))
  18.     (gimp-image-disable-undo img)
  19.     (gimp-image-resize img width height 0 0)
  20.     (gimp-image-add-layer img bg-layer 1)
  21.     (gimp-image-add-layer img glow-layer 1)
  22.  
  23.     (gimp-selection-none img)
  24.     (gimp-palette-set-background bg-color)
  25.     (gimp-edit-fill img bg-layer)
  26.  
  27.     (gimp-layer-set-preserve-trans text-layer TRUE)
  28.     (gimp-palette-set-background '(0 0 0))
  29.     (gimp-edit-fill img text-layer)
  30.  
  31.     (gimp-selection-layer-alpha img text-layer)
  32.     (gimp-selection-feather img feather1)
  33.     (gimp-palette-set-background '(221 0 0))
  34.     (gimp-edit-fill img glow-layer)
  35.     (gimp-edit-fill img glow-layer)
  36.     (gimp-edit-fill img glow-layer)
  37.  
  38.     (gimp-selection-layer-alpha img text-layer)
  39.     (gimp-selection-feather img feather2)
  40.     (gimp-palette-set-background '(232 217 18))
  41.     (gimp-edit-fill img glow-layer)
  42.     (gimp-edit-fill img glow-layer)
  43.  
  44.     (gimp-selection-layer-alpha img text-layer)
  45.     (gimp-selection-feather img feather3)
  46.     (gimp-palette-set-background '(255 255 255))
  47.     (gimp-edit-fill img glow-layer)
  48.     (gimp-selection-none img)
  49.  
  50.     (gimp-layer-set-name text-layer text)
  51.     (gimp-layer-set-mode text-layer OVERLAY)
  52.     (gimp-layer-set-name glow-layer "Glow Layer")
  53.  
  54.     (gimp-palette-set-background old-bg)
  55.     (gimp-palette-set-foreground old-fg)
  56.     (gimp-image-enable-undo img)
  57.     (gimp-display-new img)))
  58.  
  59.  
  60. (script-fu-register "script-fu-glowing-logo"
  61.             "<Toolbox>/Xtns/Script-Fu/Logos/Glowing Hot"
  62.             "Glowing hot logos"
  63.             "Spencer Kimball"
  64.             "Spencer Kimball"
  65.             "1997"
  66.             ""
  67.             SF-VALUE "Text String" "\"GLOWING\""
  68.             SF-VALUE "Font Size (in pixels)" "150"
  69.             SF-VALUE "Font" "\"Slogan\""
  70.             SF-COLOR "Background Color" '(7 0 20))
  71.